
const Constant = require("./constant.js");



// 退出 momo app
const closeMomoApp = () => {
    let pckName = app.getPackageName("MoMo");
    //强制停止 momo com.consumerug
    console.log(Constant.UI_SDK_VERSION + "强制停止 momo app: ", pckName);

    app.openAppSetting(pckName);
    text(app.getAppName(pckName)).waitFor();
    sleep(500);
    click("强行停止")
    console.log(Constant.UI_SDK_VERSION + app.getAppName(pckName) + "应用已被关闭");
    sleep(2 * 1000);
    click("确定");
    sleep(2 * 1000);
    back();
    sleep(5 * 1000);
}

module.exports = {
    closeMomoApp: closeMomoApp
};